import request from './request.js';
let service = request.service;
let download = request.download;
export default {
    getNodeList(id) {
        /**设备图纸根据id获取子节点列表 */
        return service({
            url: `/adscm/zltx/jyDrawingList/selectByParentId/${id}`,
            method: 'post'
        })
    },
    getAllDreawingList(id) {
        /**根据机器类型获取所有图纸列表 */
        return service({
            url: `/adscm/zltx/jyDrawingList/selectByDrawType/${id}`,
            method: 'post'
        })
    },
     getDreawing(id) {
         /**根据机器类型获取所有图纸列表 */
         return service({
             url: `/adscm/zltx/jyDrawingList/selectById/${id}`,
             method: 'post'
         })
     },
     addUpdateDreawing(type,data) {

           /**新增或修改图纸列表 */
           return service({
               url: `/adscm/zltx/jyDrawingListTree/${type}`,
               method: 'post',
               data
           })
     },
     searchDreawingList(keyWords) {
         /**图纸搜索 */
         return service({
             url: `/adscm/zltx/jyDrawingList/selectByKeyWords`,
             method: 'get',
             params:{
                keyWords
             }
         })
     }

}
